package instructions;

import memory.Address;
import memory.Memory;
import Computer.ProgramCounter;

public class Print implements Instruction {
	private Address address;
	
	public Print(Address address){
		this.address = address;
	}
	
	public void execute(Memory memory, ProgramCounter counter) {
		System.out.println(address.getWord(memory));
		counter.increase();
	}
	
	public String toString(){
		return "PRT " + "[" + address + "]\n";
	}
}
